package com.kamistoat.meimeimall.meimeimallcart.dao;

import com.kamistoat.meimeimall.common.annotation.AutoFillCreateTime;
import com.kamistoat.meimeimall.common.annotation.AutoFillUpdateTime;
import com.kamistoat.meimeimall.meimeimallcart.entity.CartEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CartDao {
    /**
     * 根据传入的 selectWrapper 执行查询
     * @param wrapper Entity类，做selectWrapper
     * @return
     */
    List<CartEntity> selectByWrapper(@Param("wrapper") CartEntity wrapper);

    @AutoFillCreateTime
    Long insert(CartEntity cartEntity);

    void update(@Param("entity") CartEntity cartEntity);

}
